<script>
$(document).ready(function() {
	var $pointer = $('#fragment-1');
	$('#fragment-4').hide();
	$('#fragment-3').hide();
	$('#fragment-2').hide();
	$('#fragment-5').hide();
	$('#1').addClass('button-selected');
	$('.button').click(function(){
		$('.button-selected').removeClass('button-selected');
		$(this).addClass('button-selected');
		$pointer.hide();
		$pointer = $('#fragment-'+this.id);
		$pointer.show();
	});
});
</script>

<div class="tabs">
	<div id="switcher" class="switcher">
		<div id="1" class="button"><p>
			<?= $this->lang->line('summary') ?></p>
		</div>
		<div id="2" class="button"><p>
			<?= $this->lang->line('papers') ?></p>
		</div>
		<div id="3" class="button"><p>
			<?= $this->lang->line('projects') ?></p>
		</div>
		<div id="4" class="button"><p>
			<?= $this->lang->line('books') ?></p>
		</div>
		<div id="5" class="button"><p>
			<?= $this->lang->line('associations') ?></p>
		</div>
	</div>
	<div id="fragment-1" class="tab">
	<table>
	<tr><td colspan="2"><p class="title"><?php echo $summary->fullname();?></p><br/></td></tr>
	<tr><td rowspan="3"><img class="staff_img" src="<?php echo $staff->image();?>"/></td><td><?php echo $this->lang->line('position') ." ". $staff->position(); ?></td></tr>
	<tr><td><?php echo $this->lang->line('phone') ." ". $staff->phone(); ?></td></tr>
	<tr><td><?php echo $this->lang->line('mail') ." ". $staff->email(); ?></td></tr>
	<tr><td colspan="2"><p><?php echo $summary->summary();?></p></td></tr>
	</table>
		
	</div>
	<div id="fragment-2" class="tab">
	<table class="admin_table"> <tr> <th> <?= $this->lang->line('namePaper'); ?> </th> <th><?= $this->lang->line('place') ?></th><th><?= $this->lang->line('country') ?></th></tr>
	<?php echo $papers->printTable(); ?>
	</table>
	</div>
	<div id="fragment-3" class="tab">
		<table class="admin_table"> <tr> <th> <?= $this->lang->line('nameProject'); ?> </th> <th><?= $this->lang->line('financed') ?></th></tr>
	<?php echo $projects->printTable(); ?></table>
	</div>
	<div id="fragment-4" class="tab">
		<table class="admin_table"> <tr> <th> <?= $this->lang->line('titleBook'); ?> </th> <th><?= $this->lang->line('publisher') ?></th></tr>
	<?php echo $books->printTable(); ?></table>
	</div>
	<div id="fragment-5" class="tab">
		<table class="admin_table"> <tr> <th> <?= $this->lang->line('linkAsoc'); ?> </th> <th><?= $this->lang->line('nameAsoc') ?></th></tr>
	<?php echo $assocs->printTable(); ?></table>
	</div>
</div>
